//
//  HAOrderModel.h
//  HorsemanApp
//
//  Created by qyc on 2019/8/28.
//  Copyright © 2019 q. All rights reserved.
//
/*
 `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '订单自增ID',
 `order_sn` varchar(32) NOT NULL COMMENT '订单唯一标示',
 `uid` bigint(20) NOT NULL DEFAULT '0' COMMENT '购买人ID',
 `order_status` smallint(6) NOT NULL DEFAULT '100' COMMENT '订单状态 100 待支付 | 200-已支付 | 300 余额支付 | 400 用户关单 | 500 过期关单 | 600 已支付 但是没参加 自动关单 | 700参加活动 但是过期未评价的 800 申请退款审核中 810 已退款 ',
 `post_status` smallint(6) NOT NULL DEFAULT '100' COMMENT '订单评论状态 100 未评论 | 200 已评论',
 `goods_id` varchar(128) NOT NULL COMMENT '商品id 逗号分隔',
 `pay_id` int(11) NOT NULL DEFAULT '0' COMMENT '支付方式类型,对应t_payment_goods表主键',
 `goods_amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '商品总金额',
 `order_amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '订单应付金额',
 `actual_amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '订单实付金额',
 `discount_amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '折扣金额',
 `refund_amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '订单退款金额',
 `name` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '收货人姓名',
 `mobile` varchar(128) NOT NULL DEFAULT '' COMMENT '收货人手机',
 `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '收货人地址',
 `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '订单生成时间',
 `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '编辑时间',
 `pay_time` timestamp NOT NULL DEFAULT '2001-01-01 00:00:00' COMMENT '支付时间',
 `refund_time` timestamp NOT NULL DEFAULT '2001-01-01 00:00:00' COMMENT '发起退款时间',
 `is_delete` tinyint(1) NOT NULL DEFAULT '2' COMMENT '是否被删除: 1:删除 2: 正常',
 `refund_remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '退款备注',
 `express_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '快递公司ID',
 `rider_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '骑手ID',
 `shipping_method` smallint(6) NOT NULL DEFAULT '100' COMMENT '配送方式 100 未分配 | 200 骑手配送 | 300 快递配送',
 `shipping_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '送达时间',
 `shipping_amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '配送金额',
 `address_type` tinyint(2) NOT NULL DEFAULT '1' COMMENT '下单地址类型 1 小区| 2 普通地址',
 `send_time` varchar(46) NOT NULL COMMENT '送达时间',
 `user_coupn_id` int(10) NOT NULL DEFAULT '0' COMMENT '用户优惠券表的id。t_user_coupon 主键id',
 `invoice_id` int(10) NOT NULL DEFAULT '0' COMMENT '发票id',
 `remark` varchar(256) NOT NULL DEFAULT '' COMMENT '订单备注',
 `rider_uid` int(10) NOT NULL DEFAULT '0' COMMENT '骑手uid',
 */
#import <Foundation/Foundation.h>
#import "HAAddressModel.h"
NS_ASSUME_NONNULL_BEGIN


typedef NS_ENUM(NSUInteger,UserOrderProductStatusType) {
    UserOrdersProductTypeWithUserWaitPay = 100,// 待支付
    UserOrdersProductTypeWithUserAlreadyPay = 200,// 已支付
    UserOrdersProductTypeWithUserCloseOrder = 300, // 用户关单
    UserOrdersProductTypeWithPastDueCloseOrder = 400, // 过期关单
    UserOrdersProductTypeWithManageCloseOrder = 500, // 管理员关单
    UserOrdersProductTypeWithManageCloseOrderAndEvaluate = 600, // 管理员关单且完成评价
    UserOrdersProductTypeWithHorsemanReceiving = 700, // 骑手已接单
    UserOrdersProductTypeWithExpressageDistribution = 800, // 快递已分配
    UserOrdersProductTypeWithExpressageSend = 900, // 快递已发货
    UserOrdersProductTypeWithDistributionSuccess = 1000, // 配送成功
    UserOrdersProductTypeWithDistributionSuccessAndEvaluate = 1100, // 配送成功且完成评价
    UserOrdersProductTypeWithReturnApply = 1200, // 退货申请中
    UserOrdersProductTypeWithReturnApplyMoneySuccess = 1300, // 换货退款通过审核
    UserOrdersProductTypeWithExchangeSuccess = 1400, // 换货通过审核
    UserOrdersProductTypeWithExpressageDelivery = 1500, // 骑手取货中
    UserOrdersProductTypeWithReturnGoodPut = 1600, // 退货已入库
    UserOrdersProductTypeWithRefund = 1700, // 直接退款
    UserOrdersProductTypeWithUserCancalApply = 1800, // 用户取消申请
    UserOrdersProductTypeWithMagageTurn = 1900, // 审核员驳回
    UserOrdersProductTypeWithReturnSuccess = 2000, // 退货完成
    UserOrdersProductTypeWithReturnSuccessAndEvaluate = 2100, // 退货成功且完成评价
} ;

@interface HAOrderModel : NSObject

@property (nonatomic, assign) NSInteger Id;
@property (nonatomic, copy) NSString *order_sn;
@property (nonatomic, assign) UserOrderProductStatusType order_status;
@property (nonatomic, strong) HAAddressModel *address;
@property (nonatomic, strong) HAAddressModel *address_data;
@property (nonatomic, assign) NSInteger shipping_method;
@property (nonatomic, assign) NSInteger address_type;
@property (nonatomic, copy) NSString *send_time;
@property (nonatomic, copy) NSString *shipping_time;

@end

NS_ASSUME_NONNULL_END
